#include <stdio.h>
#include <math.h>

//int main(void){	int n=1,s=1;double f=1,pi=0.0;while(fabs(f)>1e-6){pi+=f;n+=2;s=-s;f=(double)s/n;}printf("pi=%.2lf",pi*4);return 0;}
//int main(void){	unsigned long long  a=1,b=1;for(int i=1;i<=12;i++){printf("%12ld%12ld",a,b);if(i%2==0) printf("\n");a=a+b;b=a+b;}return 0;}
//int main(void)
//{
//	for(int i=1;i<=5;printf("\n"),i++)	for(int k=1;k<=5-i;printf(" "),k++);for(int j=1;j<=2*i-1;printf("*"),j++);	
//	return 0;
//}
int main(void)
{
	int i,j=0;
		for(i=1;i<=9;i++) printf("%4d",i);
			for(printf("\n"),i=1;i<=36;i++) printf("-");
				for(printf("\n"),i=1;i<=9;printf("\n"),i++)
					for(j=1;j<=i;printf("%4d",i*j),j++)	;
						return 0;
}